package net.sky.oa.service.talkpark.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import net.sky.oa.dao.talkpark.TalBoxDao;
import net.sky.oa.model.TalBox;
import net.sky.oa.service.talkpark.TalBoxService;

import com.htsoft.core.service.impl.BaseServiceImpl;
import com.htsoft.core.web.paging.PagingBean;

@Service
@Transactional
public class TalBoxServiceImpl extends BaseServiceImpl<TalBox> implements TalBoxService{
	
	private TalBoxDao talboxdao;
	
	@Resource
	public void setDao(TalBoxDao talboxdao){
		super.setDao(talboxdao);
		this.talboxdao=talboxdao;
	}
	
	@Transactional(readOnly=true)
	public List<TalBox> findAllTalBox() {
		
		return talboxdao.findAllTalbox();
	}
	@Transactional(readOnly=true)
    public List<TalBox> getTalboxByUserId(Long UserId,HttpServletRequest getRequest,PagingBean pb){
		String title=getRequest.getParameter("title");
		String type=getRequest.getParameter("type");
		String time=getRequest.getParameter("createtime");
		int ty=-1;
		if(StringUtils.isNotEmpty((type)))ty=Integer.valueOf(type);
		return this.talboxdao.getTalboxByUserId(UserId, ty, title, time, pb);
	}

	public List<TalBox> findByHql(String paramString) {
		
		return null;
	}
    
	
	

	
}
